<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		
		<script type="text/javascript">
			// int num;
			// js弱类型语言 java：强类型语言
			var num;
			console.log(num);//undefined
			console.log(typeof(num));//undefined
			num = 3.14;
			console.log(num);//3.14
			console.log(typeof(num));//number
			num = 'js';
			console.log(num);//js
			console.log(typeof(num));//string
			num = true;
			console.log(num);//true
			console.log(typeof(num));//boolean
			num = null;
			console.log(num);//true
			console.log(typeof(num));//object
			
			var m = '3';//string
			var n = 3;//number
			if (m == n) {
				console.log('m==n')
			}
			if (m === n) {
				console.log('m===n')
			}
			
			var str = 'Hello JS and Java';
			console.log(str.indexOf('JS'));//6
			console.log(str.indexOf('JS', 9));//-1
			console.log(str.lastIndexOf('JS'));//6
			
			var str1 = 'how are you doing today';
			var array = str1.split(' ');
			console.log(array);
			console.log(array[1]);
			console.log('2:3:4:5'.split(':'));
			
			if (0) {
				console.log('0')
			}
			if (1) {
				console.log('1')
			}
		</script>
	</body>
</html>
